package com.hfjyz.tutor.tutor.bean;

import com.hfjyz.base.util.CodeUtil;

public class TutorExcelBean extends TutorBean {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 4199943623842048876L;

    private String sexValue = null;
    private String priceValue = null;
    public TutorExcelBean() {
    }

    public TutorExcelBean(TutorBean tutor) {
        this.address = tutor.address;
        this.birthday = tutor.birthday;
        this.callTimes = tutor.callTimes;
        this.categoryId = tutor.categoryId;
        this.cellPhone = tutor.cellPhone;
        this.cellPhoneBak = tutor.cellPhoneBak;
        this.id = tutor.id;
        this.idNo = tutor.idNo;
        this.imAddress = tutor.imAddress;
        this.introduction = tutor.introduction;
        this.isSigned = tutor.isSigned;
        this.mailAddress = tutor.mailAddress;
        this.mailAddressBak = tutor.mailAddressBak;
        this.major = tutor.major;
        this.name = tutor.name;
        this.outLine = tutor.outLine;
        this.phone = tutor.phone;
        this.phoneBak = tutor.phoneBak;
        this.photo = tutor.photo;
        this.price = tutor.price;
        this.regDate = tutor.getRegDate();
        this.remark = tutor.remark;
        this.sex = tutor.sex;
        this.style = tutor.style;
        this.task = tutor.task;
        this.type = tutor.type;
        this.sexValue = CodeUtil.getSexString(tutor.sex);
    }

    public String getSexValue() {
        return sexValue;
    }

    public void setSexValue(String sexValue) {
        setSex(CodeUtil.getSexCode(sexValue));
        this.sexValue = sexValue;
    }

    public String getSignValue() {
        return signValue;
    }

    public void setSignValue(String signValue) {
        if (signValue == null || signValue.trim().isEmpty()) {
            setIsSigned(0);
        } else {
            setIsSigned(1);
        }
        this.signValue = signValue;
    }

    public String getPriceValue() {
        return priceValue;
    }

    public void setPriceValue(String priceValue) {
        this.priceValue = priceValue;
        try {
            this.price = Float.valueOf(priceValue);
        } catch (Exception e) {
        }
    }
}
